<?php
defined('_JEXEC') or die('Restricted Access');//1.5

$basiccontroller = JPATH_COMPONENT.DS.'controller.php';
		
if(file_exists($basiccontroller)){
	require_once ($basiccontroller);
	require_once (JPATH_COMPONENT.DS.'models'.DS.'default.php');
	// Require specific controller if requested
	if($ucontroller = JRequest::getWord('controller', 'application')) {
		$path = JPATH_COMPONENT.DS.'controllers'.DS.$ucontroller.'.php';
		if (file_exists($path)) {
			require_once ($path);
		} else {
			$ucontroller = '';
		}
	}
	// Create the controller
	$classname	= 'JWPBlogController'.ucfirst($ucontroller);
	$controller	= new $classname( );
	$controller->execute( JRequest::getCmd('task'));
	$controller->redirect();		
}else{
	$task = JRequest::getWord('task');
	$mojo_exec_point = JPATH_SITE.DS.'components'.DS.'com_mojo'.DS.'wp-admin';
	switch($task){
		case 'edit':
			require_once($mojo_exec_point.DS.'edit.php');
			break;
		case 'post':
			require_once($mojo_exec_point.DS.'post.php');
			break;
	
		case 'admin':
		default:
			require_once($mojo_exec_point.DS.'admin.php');
			require_once($mojo_exec_point.DS.'index.php');		
	}

}
//$title = __('Dashboard'); 
//require_once('admin-header.php');
//require_once (ABSPATH . WPINC . '/rss-functions.php');


/**
  * @version $Id: admin.mojo.php,v0.16 2007/25/07 11:55:55 visualweb Exp $ 
  * @package com_mojo
  * @copyright (c) 1guywebdesign.com 
  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL 
  */
/*  
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

$url= $mosConfig_live_site.'/components/com_mojo/wp-admin/';

// NEED TO:: Integrate from iFrame to inline -- kdm
$load = 'onload="iFrameHeight()"';

<script language="javascript" type="text/javascript">
		function iFrameHeight() {
			var h = 0;
			if ( !document.all ) {
				h = document.getElementById('blockrandom').contentDocument.height;
				document.getElementById('blockrandom').style.height = h + 60 + 'px';
			} else if( document.all ) {
				h = document.frames('blockrandom').document.body.scrollHeight;
				document.all.blockrandom.style.height = h + 20 + 'px';
			}
		}
		</script>
<iframe
		<?php echo $load; ?>
			id="blockrandom"
			name="iframe"
			src="<?php echo $url; ?>"
			width="99%"
			height="500"
			scrolling="auto"
			align="top"
			frameborder="0"
			class="wrapper">
		<?php echo _CMN_IFRAMES; ?>
		</iframe>
*/
?>